<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>lodash</title>
    <script src="lodash.min.js"></script>
</head>
<body>
    <script>
        var users = [
            { 'user': 'barney', 'age': 36, 'active': true },
            { 'user': 'fred',   'age': 40, 'active': false }
        ];
        
        var a1 = _.filter(users, function(o) { return !o.active; });
        // => objects for ['fred']
        
        // The `_.matches` iteratee shorthand.
        var a2 = _.filter(users, { 'age': 36, 'active': true });
        // => objects for ['barney']
        
        // The `_.matchesProperty` iteratee shorthand.
        var a3 = _.filter(users, ['active', false]);
        // => objects for ['fred']
        
        // The `_.property` iteratee shorthand.
        var a4 = _.filter(users, 'active');
        // => objects for ['barney']

        console.log(a1);
        console.log(a2);
        console.log(a3);
        console.log(a4);
    </script>
    
</body>
</html>